home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 361_01 / dread.c < prev    next >
C/C++ Source or Header  |  1991-09-18  |  566b  |  26 lines

  1.  
  2. /* Dread.c --> Direct Video CRT Reads in Text Mode.
  3.  *
  4.  * Author: J.Ekwall                                     13 September 91
  5.  *
  6.  * Copyrighted to the Public Domain.  Unlimited Distribution Authorized.
  7.  *
  8.  * User Assumes All Risks/Liabilities.
  9.  *
  10.  * Last Update: 13 September 91/EK
  11.  */
  12.  
  13. #include <stdlib.h>
  14. #include <stdek.h>
  15. #include <gadgets.h>
  16.  
  17. void Dread(int X, int Y, char *Text, int N)
  18. {
  19.     int Addr;
  20.  
  21.     Addr = Vaddr(X, Y);
  22.     for (*Text = NULL; N-- && X++ < 80; *Text = NULL, Addr += 2)
  23.         *Text++ = Vpeek(Addr) & 0xFF;
  24. }
  25.  
  26.